/**
 * 版权所有（c）2021. 上海海鼎信息工程股份有限公司，保留所有权利
 */
package com.lovely602.design.behavior.observer;

/**
 * 观察者模式
 *
 * @author lizhixing
 */
public class ObserverPattern {

  public static void main(String[] args) {
    Subject subject = new ConcreteSubject();
    Observer obs1 = new ConcreteObserver1();
    Observer obs2 = new ConcreteObserver2();
    subject.add(obs1);
    subject.add(obs2);
    subject.notifyObserver();
  }
}
